package com.lzx.spring3.dao.impl;

import org.springframework.stereotype.Component;

import com.lzx.spring3.dao.MetricDao;
import com.lzx.spring3.meta.Metric;

/**
 * 
 * @author sunlzx
 * 
 */
@Component("metricDao")
public class MetricDaoImpl extends BaseDao implements MetricDao {

	@Override
	public int add(Metric metric) {
		String sql = "insert into metric(projectId, namespace, metricName, dimension) values(?,?,?,?)";
		Object[] objs = new Object[]{
				metric.getProjectId(),
				metric.getNamespace(),
				metric.getMetricName(),
				metric.getDimension()
		};
		return insert(sql, objs);
	}

	@Override
	public int update(Metric metric) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int delete(Metric metric) {
		// TODO Auto-generated method stub
		return 0;
	}

}
